package com.guanglan.utils;
import java.util.UUID;

public class UUIDUtils{
	    
	  public static synchronized String getUUID(){
	    UUID uuid=UUID.randomUUID();
	    String str = uuid.toString(); 
	    String uuidStr=str.replace("-", "");
	    return uuidStr;
	  }
	  
	  
	  
	  public static synchronized String getUUID(String name){
	    UUID uuid=UUID.nameUUIDFromBytes(name.getBytes());
	    String str = uuid.toString(); 
	    String uuidStr=str.replace("-", "");
	    return uuidStr;
	  }
	  
	  public static void main(String[] args) {
		System.out.println(getUUID("123"));
	  }
	  
	  
	  
	}